(function () {
    'use strict';

    angular
        .module('app.RefStatus')
        .controller('ReferralStatusController', ReferralStatusController);

    ReferralStatusController.$inject = ['$state', '$rootScope', '$mdDialog', '$timeout', 'PatientDemoData'];
    /* @ngInject */
    function ReferralStatusController($state, $rootScope, $mdDialog, $timeout, PatientDemoData) {
        var vm = this;
        vm.title = 'Referral Status';
        vm.StatusLog = '';
        vm.CloseClick = CloseClick;
       
        activate();
        
        function activate() {
            var promise = PatientDemoData.GetReferralLog($rootScope.LogReferralID)
            .then(function (response) {
                vm.StatusLog = response.data.LogMsg;
            });  
        }

        function CloseClick() {
            $mdDialog.hide();
        }
        
    }
})();


